<?php

namespace app\backend\validator;

use think\Validate;

class LoginValidator extends Validate
{
    protected $rule = [
        'username' => 'require|max:30',
        'password' => 'require|alphaNum|min:6|max:12',
    ];

    protected $message = [
        'username.require' => '账号必填',
        'username.min' => '账号长度不能小于4个字符',
        'username.max' => '账号长度不能超过18个字符',
        'password.require' => '密码必填',
        'password.min' => '密码长度不能小于6个字符',
        'password.max' => '密码长度不能小于6个字符'
    ];
}